package net.sudot.flow.dsl.model;

import groovy.lang.GroovyInterceptable;
import groovy.lang.GroovyObjectSupport;

/**
 * @author tangjialin on 2020-03-16.
 */
public abstract class AbstractObject extends GroovyObjectSupport implements GroovyInterceptable {
    public void methodMissing(String name, Object args) {
        if (args instanceof Object[]) {
            Object[] args1 = (Object[]) args;
            setProperty(name, args1.length > 0 ? args1[0] : args);
        } else {
            System.out.println(name + "参数错误");
        }
    }
}
